#include "mMsgUndef.h"

#define BEGIN_MSG_NAMESPACE(NAMESPACE, START_INDEX) \
	namespace NAMESPACE { \

#define BEGIN_MSG(TYPE) \
	void s##TYPE::FromScriptMessage(const cScriptMessage& _message_) \
	{ \
	const sScriptMessageValue* _messageValue_ = NULL;

//#define BEGIN_MSG(API, TYPE) \
//	void s##TYPE::FromScriptMessage(const cScriptMessage& _message_) \
//	{ \
//	const sScriptMessageValue* _messageValue_ = NULL;

#define END_MSG() \
	}

#define END_MSG_NAMESPACE() \
	}

#define MSG_FIELD(TYPE, NAME, VALUE) \
	_messageValue_ = _message_.GetValue(#NAME); \
	if (_messageValue_ != NULL) \
	{ \
	GetScriptMessageValueToNMsgField(*_messageValue_, OUT NAME); \
	}